home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_11 / phillip2 / makefile < prev    next >
Makefile  |  1993-10-10  |  18KB  |  815 lines

  1. ######################################################
  2. #
  3. #   Dwayne Phillips
  4. #   The C Image Processing System
  5. #   written for
  6. #   The C Users Journal
  7. #   1990-1993
  8. #
  9. #   This makefile uses Microsoft's nmake 
  10. #   program.  See "Microsoft C Advanced Programming
  11. #   Techniques," Chapter 6, Microsoft Corp., 1990.
  12. #
  13. #
  14. #      C O N T E N T S
  15. #
  16. #   Define Macros
  17. #   Compile Source Files
  18. #   Composite Files
  19. #   CIPS Programs
  20. #   CIPS Backups
  21. #   cipscat
  22. #   fit
  23. #
  24. ######################################################
  25. #
  26. #      D E F I N E   M A C R O S
  27. #
  28. #   Microsoft C 6.0 commands
  29. #   compile options
  30. #      /AL = large memory model
  31. #      /c  = do not create .exe file
  32. #      /Zi = prepare for Codeview
  33. #      /Od = remove optimization for Codeview
  34. #      /G2 = create 80286 code instead of 8086 code
  35. #
  36. #   linker options
  37. #      /CO = prepare for Codeview
  38. #      /STACK:50000 = allocate 50000 bytes for stack
  39. #
  40.  
  41. #   Define the compile command for the large model
  42. CC = CL /AL /c
  43.  
  44. #   Define the compile command for the large model
  45. #   and the Codeview debugger
  46. CCV = CL /AL /Zi /od /c
  47.  
  48. #   Define the compile and link in one command
  49. CAL = CL /AL /o
  50.  
  51. #   Define the Codeview and stack command
  52. #   for the linker commands.
  53. #   The $* means the target's base name
  54. #   with no extensions.  So
  55. #   /STACK:40000,$*,$*; equals
  56. #   /STACK:40000,toc,toc;
  57. ST40K = /STACK:40000,$*,$*;
  58. ST45K = /STACK:45000,$*,$*;
  59. ST50K = /STACK:50000,$*,$*;
  60. COST40K = /CO /STACK:40000,$*,$*;
  61. COST45K = /CO /STACK:45000,$*,$*;
  62. COST50K = /CO /STACK:50000,$*,$*;
  63. #   NOTE:  When I installed my Microsoft C, I
  64. #          included the Microsoft graphics library
  65. #          in the main library.  If you did not
  66. #          do this, you should use the following
  67. #          for the stack linker commands (assuming
  68. #          you installed Microsoft C in d:):
  69. #
  70. #ST40K = /STACK:40000,$*,$*,d:\c600\lib\graphics.lib;
  71. #ST45K = /STACK:45000,$*,$*,d:\c600\lib\graphics.lib;
  72. #ST50K = /STACK:50000,$*,$*,d:\c600\lib\graphics.lib;
  73. #COST40K = /CO /STACK:40000,$*,$*,d:\c600\lib\graphics.lib;
  74. #COST45K = /CO /STACK:45000,$*,$*,d:\c600\lib\graphics.lib;
  75. #COST50K = /CO /STACK:50000,$*,$*,d:\c600\lib\graphics.lib;
  76.  
  77.  
  78.  
  79.  
  80. ######################################################
  81. #
  82. #      C O M P I L E   S O U R C E   F I L E S
  83. #
  84.  
  85. pattern.obj :  pattern.c cips.h
  86.      $(CC) pattern.c
  87.  
  88. segment3.obj :  segment3.c cips.h
  89.      $(CC) segment3.c
  90.  
  91. roundoff.obj :  roundoff.c cips.h
  92.      $(CC) roundoff.c
  93.  
  94. ndir.obj :  ndir.c
  95.      $(CC) ndir.c
  96.  
  97. tiff.obj :  tiff.c cips.h
  98.      $(CC) tiff.c
  99.  
  100. gin.obj :  gin.c cips.h
  101.      $(CC) gin.c
  102.  
  103. rstring.obj :  rstring.c cips.h
  104.      $(CC) rstring.c
  105.  
  106. texture.obj :  texture.c cips.h
  107.      $(CC) texture.c
  108.  
  109. xtra.obj :  xtra.c cips.h
  110.      $(CC) xtra.c
  111.  
  112. txtrsubs.obj :  txtrsubs.c cips.h
  113.      $(CC) txtrsubs.c
  114.  
  115. mrw.obj :  mrw.c cips.h
  116.      $(CC) mrw.c
  117.  
  118. mof.obj :  mof.c cips.h
  119.      $(CC) mof.c
  120.  
  121. rtiff.obj :  rtiff.c cips.h
  122.      $(CC) rtiff.c
  123.  
  124. cips.obj :  cips.c cips.h
  125.      $(CC) cips.c
  126.  
  127. show.obj :  show.c cips.h
  128.      $(CC) show.c
  129.  
  130. cipspr.obj :  cipspr.c cips.h
  131.      $(CC) cipspr.c
  132.  
  133. gpcips.obj :  gpcips.c cips.h
  134.      $(CC) gpcips.c
  135.  
  136. mymsc.obj :  mymsc.c cips.h
  137.      $(CC) mymsc.c
  138.  
  139. fwrite.obj :  fwrite.c cips.h
  140.      $(CC) fwrite.c
  141.  
  142. numcvrt.obj :  numcvrt.c cips.h
  143.      $(CC) numcvrt.c
  144.  
  145. display.obj :  display.c cips.h
  146.      $(CC) display.c
  147. #   xdisplay.c is a version of display.c
  148. #   containing experimental code that
  149. #   is not used in CIPS
  150. xdisplay.obj :  xdisplay.c cips.h
  151.      $(CC) xdisplay.c
  152.  
  153. hist.obj :  hist.c cips.h
  154.      $(CC) hist.c
  155.  
  156. strappnd.obj :  strappnd.c cips.h
  157.      $(CC) strappnd.c
  158.  
  159. pi.obj :  pi.c cips.h
  160.      $(CC) pi.c
  161.  
  162. ht.obj :  ht.c cips.h
  163.      $(CC) ht.c
  164.  
  165. djet.obj :  djet.c cips.h
  166.      $(CC) djet.c
  167.  
  168. filter.obj :  filter.c cips.h
  169.      $(CC) filter.c
  170.  
  171. addsub.obj :  addsub.c cips.h
  172.      $(CC) addsub.c
  173.  
  174. rotate.obj :  rotate.c cips.h
  175.      $(CC) rotate.c
  176.  
  177. cutp.obj :  cutp.c cips.h
  178.      $(CC) cutp.c
  179.  
  180. scale.obj :  scale.c cips.h
  181.      $(CC) scale.c
  182.  
  183. mainas.obj :  mainas.c cips.h
  184.      $(CC) mainas.c
  185.  
  186. mainr.obj :  mainr.c cips.h
  187.      $(CC) mainr.c
  188.  
  189. maincp.obj :  maincp.c cips.h
  190.      $(CC) maincp.c
  191.  
  192. main422.obj : main422.c cips.h
  193.      $(CC) main422.c
  194.  
  195. half.obj : half.c cips.h
  196.      $(CC) half.c
  197.  
  198. double.obj :  double.c cips.h
  199.      $(CC) double.c
  200.  
  201. side.obj : side.c cips.h
  202.      $(CC) side.c
  203.  
  204. edge.obj :  edge.c cips.h
  205.      $(CC) edge.c
  206.  
  207. edge2.obj :  edge2.c cips.h
  208.      $(CC) edge2.c
  209.  
  210. edge3.obj :  edge3.c cips.h
  211.      $(CC) edge3.c
  212.  
  213. wtiff.obj :  wtiff.c cips.h
  214.      $(CC) wtiff.c
  215.  
  216. create.obj :  create.c cips.h
  217.      $(CC) create.c
  218.  
  219. wtiffh.obj :  wtiffh.c cips.h
  220.      $(CC) wtiffh.c
  221.  
  222. boole.obj : boole.c cips.h
  223.      $(CC) boole.c
  224.  
  225. boolean.obj : boolean.c cips.h
  226.      $(CC) boolean.c
  227.  
  228. overlay.obj : overlay.c cips.h
  229.      $(CC) overlay.c
  230.  
  231. ed.obj : ed.c cips.h
  232.      $(CC) ed.c
  233.  
  234. skeleton.obj : skeleton.c cips.h
  235.      $(CC) skeleton.c
  236.  
  237. mainsk.obj : mainsk.c cips.h
  238.      $(CC) mainsk.c
  239. invert.obj : invert.c cips.h
  240.      $(CC) invert.c
  241.  
  242. mainover.obj : mainover.c cips.h
  243.      $(CC) mainover.c
  244.  
  245. mainedge.obj :  mainedge.c cips.h
  246.      $(CC) mainedge.c
  247.  
  248. mainhist.obj :  mainhist.c cips.h
  249.      $(CC) mainhist.c
  250.  
  251. mainfilt.obj :  mainfilt.c cips.h
  252.      $(CC) mainfilt.c
  253.  
  254. mainseg.obj : mainseg.c cips.h
  255.      $(CC) mainseg.c
  256.  
  257. main2seg.obj : main2seg.c cips.h
  258.      $(CC) main2seg.c
  259.  
  260. main3seg.obj : main3seg.c cips.h
  261.      $(CC) main3seg.c
  262.  
  263. fixt.obj : fixt.c cips.h
  264.      $(CC) fixt.c
  265.  
  266. unfixt.obj : unfixt.c cips.h
  267.      $(CC) unfixt.c
  268.  
  269. segment.obj : segment.c cips.h
  270.      $(CC) segment.c
  271.  
  272. segment2.obj :  segment2.c cips.h
  273.      $(CC) segment2.c
  274.  
  275. ###############################################
  276. #
  277. #      C O M P O S I T E   F I L E S
  278. #
  279. #  Composite files are like small libraries.
  280. #  A composite file contains several .c file
  281. #  concatenated together.  This makes the
  282. #  command lines shorter for linking the .obj
  283. #  files into .exe files.
  284. #
  285. #  The cipscat program (see end of makefile)
  286. #  concatenates these together automatically.
  287. #
  288. #
  289. #
  290. #
  291. #  COMPOSITE FILE
  292. #  tiffs.c = rtiff.c + wtiff.c + tiff.c
  293. tiffs.obj :  tiffs.c cips.h
  294.      $(CC) tiffs.c
  295.  
  296. tiffs.c: rtiff.c  wtiff.c  tiff.c
  297.      cipscat rtiff.c  wtiff.c  tiff.c -o tiffs.c
  298.  
  299.  
  300.  
  301. #  COMPOSITE FILE
  302. # cips2.c = rstring + mof + mrw + gpcips
  303. #           + numcvrt + strappnd
  304. #
  305. #   The above was changed to the below
  306. #   12 May 1993
  307. #
  308. # cips2.c = gpcips + numcvrt + mymsc.c
  309. cips2.obj :  cips2.c cips.h
  310.      $(CC) cips2.c
  311.  
  312. cips2.c: gpcips.c numcvrt.c mymsc.c
  313.      cipscat gpcips.c numcvrt.c mymsc.c -o cips2.c
  314.  
  315.  
  316.  
  317. #  COMPOSITE FILE
  318. # cips3.c = addsub + cutp + rotate
  319. cips3.obj :  cips3.c cips.h
  320.      $(CC) cips3.c
  321.  
  322. cips3.c: addsub.c cutp.c rotate.c
  323.      cipscat addsub.c cutp.c rotate.c -o cips3.c
  324.  
  325.  
  326.  
  327. #  COMPOSITE FILE
  328. # cips4.c = gin + fwrite + hist + pi + ht
  329. #
  330. #   The above was changed to the below
  331. #   12 May 1993
  332. #
  333. # cips4.c = gin + hist + pi + ht
  334. cips4.obj :  cips4.c cips.h
  335.      $(CC) cips4.c
  336.  
  337. cips4.c: gin.c  hist.c  pi.c  ht.c
  338.      cipscat gin.c hist.c pi.c ht.c -o cips4.c
  339.  
  340.  
  341.  
  342. #  COMPOSITE FILE
  343. # cips5.c = boole + overlay + txtrsubs
  344. cips5.obj :  cips5.c cips.h
  345.      $(CC) cips5.c
  346.  
  347. cips5.c: boole.c overlay.c txtrsubs.c
  348.      cipscat boole.c overlay.c txtrsubs.c -o cips5.c
  349.  
  350.  
  351.  
  352. #  COMPOSITE FILE
  353. # edges.c = edge.c + edge2.c + edge3.c
  354. edges.obj :  edges.c cips.h
  355.      $(CC) edges.c
  356.  
  357. edges.c: edge.c edge2.c edge3.c
  358.      cipscat edge.c edge2.c edge3.c -o edges.c
  359.  
  360.  
  361.  
  362. #  COMPOSITE FILE
  363. # segments.c = segment.c + segment2.c
  364. segments.obj : segments.c cips.h
  365.      $(CC) segments.c
  366.  
  367. segments.c: segment.c segment2.c
  368.      cipscat segment.c segment2.c -o segments.c
  369.  
  370.  
  371.  
  372. #  COMPOSITE FILE
  373. # morph.c = ed.c + skeleton.c
  374. morph.obj : morph.c cips.h
  375.      $(CC) morph.c
  376.  
  377. morph.c: ed.c skeleton.c
  378.      cipscat ed.c skeleton.c -o morph.c
  379.  
  380.  
  381. ######################################################
  382. #
  383. #      C I P S   P R O G R A M S
  384. #
  385. #   Special make targets:
  386. #      allip - makes all .exe's - may not